<?#//v.3.0.0
#///////////////////////////////////////////////////////
#//  COPYRIGHT 2004 Phpauction.org ALL RIGHTS RESERVED//
#///////////////////////////////////////////////////////

require('../includes/config.inc.php');
include "loggedin.inc.php";

if($_POST['action'] == 'updatelanguage' && phpa_securepost($_POST))
{
	@mysql_query("UPDATE PHPAUCTIONXL_settings SET defaultlanguage='".$_POST['deflang']."'");
}

#// Retrieve default language
$DEFAULTLANGUAGE = mysql_result(@mysql_query("SELECT defaultlanguage FROM PHPAUCTIONXL_settings"),0,"defaultlanguage");

#// Retrieve available languages
?>
<HTML>
<HEAD>
<link rel='stylesheet' type='text/css' href='style.css' />
<link href="css/main.css" rel="stylesheet" type="text/css">
</HEAD>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<? print  $TPL_info_err . ""?><table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="titulo">
        <tr> 
          <td class="icono"><img src="images/pref_icon2.gif" width="28" height="28"></td>
          <td class="breadcrumbs"><p><span><?=$MSG_25_0008?></span>&nbsp;&gt;&gt;&nbsp;<?=$MGS_2__0002?></p></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td align="center" valign="middle">&nbsp;</td>
  </tr>
    <tr> 
    <td align="center" valign="middle">
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0 BGCOLOR="#FFFFFF">
<TR>
<TD align="center">
	<BR>
	<FORM NAME=conf ACTION="<?=$_SERVER['PHP_SELF']?>" METHOD=POST>
	<TABLE WIDTH="95%" BORDER="0" CELLSPACING="0" CELLPADDING="0" class="base" ALIGN="CENTER" style="border:1px solid #ccc;">
		<TR>
			<TD ALIGN=CENTER class=title>
				<p><? print $MGS_2__0002; ?></p>
			</TD>
		</TR>
		<TR>
			<TD><TABLE WIDTH="100%" BORDER="0" CELLPADDING="2" CELLSPACING="0" BGCOLOR="#FFFFFF">
			  <TR>
				<TD colspan="2"><p><?=$MGS_2__0003?></p></TD>
				</TR>
			  
			  <TR>
				<TD VALIGN=top><p class="blue"><?=$MGS_2__0004?></p></TD>
				<TD>
				<?
				if(is_array($LANGUAGES))
				{
					reset($LANGUAGES);
					while(list($k,$v) = each($LANGUAGES))
					{
				?>
						<INPUT TYPE=radio NAME=deflang value=<?=$k?> <?if($DEFAULTLANGUAGE == $k) print " CHECKED";?>>
						<IMG SRC=../includes/flags/<?=$k?>.gif HSPACE=2>
						<?=$v?>
						<?
						if($DEFAULTLANGUAGE == $k)
						{
							print "&nbsp;".$MGS_2__0005;
						}
						?>
						<BR>
				<?
					}
				}
				?>				</TD>
			  </TR>
			 
			  <TR>
				<TD VALIGN=top>&nbsp;</TD>
				<TD>
					<INPUT TYPE="hidden" NAME="action" VALUE="updatelanguage">
					<INPUT TYPE="hidden" NAME="security" VALUE="<?php echo $_SESSION['security'];?>" />
					<INPUT TYPE="submit" NAME="Submit" VALUE="<?=$MSG_530?>" class="action">				</TD>
			  </TR>
			  
			  </TABLE>
		</TD>
		</TR>
	</TABLE>
	</FORM>
<CENTER>
	</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
